<ui:composition template="/WEB-INF/templates/customer/base.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

	<ui:define name="title">Dettagli Pacchetto</ui:define>
	
	<ui:define name="content">
		<p:panelGrid style="width:100%; margin:10px 0">
			<f:facet name="header">  
       			<p:row>  
           			<p:column colspan="2">#{defaultPackageBean.pack.name}</p:column>  
    			</p:row>
				<p:row>  
		            <p:column>Descrizione</p:column>  
		            <p:column></p:column>  
		        </p:row>  
  			</f:facet>
      			
   			<p:row>
   				<p:column>#{defaultPackageBean.pack.description}</p:column>
   				<p:column style="text-align: center; width: 250px">
   					 <p:graphicImage rendered="#{defaultPackageBean.pack.image != ''}" value="#{defaultPackageBean.pack.image}" style="max-width: 200px; max-height: 200px"/>
   					 <div class="ui-widget-header ui-corner-all" style="padding: 3px; text-align: center;">#{defaultPackageBean.pack.duration} Notti a soli #{defaultPackageBean.pack.price} €</div>
   				</p:column>
  			</p:row>
       	</p:panelGrid>
       	
       	<p:panelGrid style="width:100%; margin:10px 0">
       		<f:facet name="header">  
       			<p:row>  
           			<p:column colspan="5">Andata</p:column>  
      			</p:row>
      			<p:row>
      				<p:column>Nome</p:column>
					<p:column>Descrizione</p:column>
					<p:column>Origine</p:column>
					<p:column>Destinazione</p:column>
					<p:column>Prezzo</p:column>
      			</p:row>
       		</f:facet>
       		
       		<p:row>
	       		<p:column>
					<h:outputText value="#{defaultPackageBean.pack.going.name}" />
				</p:column>
				
				<p:column>
					<h:outputText value="#{defaultPackageBean.pack.going.description}" />
				</p:column>
				
				<p:column>
					<h:outputText value="#{defaultPackageBean.pack.going.origin}" />
				</p:column>
				
				<p:column>
					<h:outputText value="#{defaultPackageBean.pack.going.destination}" />
				</p:column>
				
				<p:column>
					<h:outputText value="#{defaultPackageBean.pack.going.price}" />
				</p:column>
			</p:row>
       		
       	</p:panelGrid>
       	
       	 	<p:panelGrid style="width:100%; margin:10px 0">
       		<f:facet name="header">  
       			<p:row>  
           			<p:column colspan="5">Ritorno</p:column>  
      			</p:row>
      			<p:row>
      				<p:column>Nome</p:column>
					<p:column>Descrizione</p:column>
					<p:column>Origine</p:column>
					<p:column>Destinazione</p:column>
					<p:column>Prezzo</p:column>
      			</p:row>
       		</f:facet>
       		
       		<p:row>
	       		<p:column>
					<h:outputText value="#{defaultPackageBean.pack.back.name}" />
				</p:column>
				
				<p:column>
					<h:outputText value="#{defaultPackageBean.pack.back.description}" />
				</p:column>
				
				<p:column>
					<h:outputText value="#{defaultPackageBean.pack.back.origin}" />
				</p:column>
				
				<p:column>
					<h:outputText value="#{defaultPackageBean.pack.back.destination}" />
				</p:column>
				
				<p:column>
					<h:outputText value="#{defaultPackageBean.pack.back.price}" />
				</p:column>
			</p:row>
       		
       	</p:panelGrid>
       	
       	
       	<p:dataTable var="schedule" value="#{defaultPackageBean.activityList}" style="width:100%; margin:10px 0">
       		<f:facet name="header">
       			Attività
       		</f:facet>
			<p:column headerText="Id">
				<h:outputText value="#{schedule.activity.id}" />
			</p:column>
			
			<p:column headerText="Nome">
				<h:outputText value="#{schedule.activity.name}" />
			</p:column>
			
			<p:column headerText="Descrizione">
				<h:outputText value="#{schedule.activity.description}" />
			</p:column>
			
			<p:column headerText="Prezzo">
				<h:outputText value="#{schedule.activity.price}" />
			</p:column>
		</p:dataTable>
		<div style="width:100%; text-align: right; ">
			<p:button value="Personalizza" outcome="/customize">
				<f:param name="packageId" value="#{defaultPackageBean.pack.id}" />
			</p:button>
		</div>
	</ui:define>
</ui:composition>